package com.abo.yaas.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

@SuppressWarnings("serial")
@Entity
@Table(name = "TBL_ItemCategory")
@XmlRootElement
public class Category extends YaasPojo {
    private String title = "";

    public Category() {
    }

    public Category(String title) {
        this.title = title;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof Category)) {
            return false;
        }

        if (obj == this) {
            return true;
        }

        if (getId() == null) {
            return super.equals(obj);
        }

        return getId().equals(((Category) obj).getId());
    }

    @Column(name = "Title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

}
